{template "content","header"}
<!--<header class="lc-xsl-hd clearfix">
		<a href="javascript:history.go(-1);" class="lc-hd-back"></a>
		参与新丝路超模赛事
		<!-- <h1 class="lc-xsl-tit"></h1>
		<a href="" class="lc-hd-search"></a>
	</header> -->
		<div class="lc-top-switch clearfix">
			<div class="ptcpt-on current" id="js-ptcpt">我要参赛</div>
			<div class="watch-on" id="js-watch">我要观赛</div>
		</div>
		<div class="com-banner">
			<img src="{IMG_PATH}nsr/ptcpt-banner.png" alt="" class="banner-pic">
		</div>
		<!-- 报名 -->
		<div class="ptcpt-box" id="js-bm" >
		<form action="/index.php?m=motoreg&c=index&a=enjoy_game_register" method="post" onsubmit="return checkForm()">
			<div class="form-box">
			<ul class="ptcpt-form">
				<li class="li-input clearfix">
					<input type="text" name="enjoy[username]" placeholder="请输入姓名">
					<p class="input-err" id="username_error" style="display:none;">输入错误</p>
				</li>
				<li class="li-input clearfix">
					<input type="text" name="enjoy[email]" placeholder="请输入联系邮箱">
					<p class="input-err" id="email_error" style="display:none;">输入错误</p>
				</li>
				<li class="li-input clearfix">
					<input type="text" name="enjoy[phone]" placeholder="请输入手机号">
					<a class="ptcpt-verify">获取验证码</a>
					<p class="input-err" id="phone_error" style="display:none;">输入错误</p>
				</li>
				<li class="li-input clearfix">
					<input type="text" name="enjoy[valicode]" placeholder="请输入验证码">
					<p class="input-err" id="valicode_error" style="display:none;">输入错误</p>
				</li>
			</ul>
			</div>
			<input type="submit" class="ptcpt-btn" id="js-bm" value="报&nbsp名"/>
		</div>
		<!-- 观赛 -->
		<div class="watch-game" id="js-gs"  style="display:none;">
			<div class="form-box">
			<ul class="ptcpt-form">
				<li class="li-input clearfix">
					<input type="text" placeholder="请输入手机号"><a class="ptcpt-verify">获取验证码</a>
				    <p class="input-err" style="display:none;">输入错误</p>
				</li>
				<li class="li-input clearfix">
					<input type="text" placeholder="请输入验证码">
	                <p class="input-err" style="display:none;">输入错误</p>
				</li>
			</ul>
			</div>
			<a href="" class="ptcpt-btn" >报&nbsp名</a>
		</div>
	<script type="text/javascript" src="{JS_PATH}nsr/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="{JS_PATH}nsr/lc_adp.js"></script>
	<script type="text/javascript" src="{JS_PATH}nsr/lc_js.js"></script>
	<script type="text/javascript">
		function checkForm(){
			var username = $("input[name='enjoy[username]']").val();
			var tel = $("input[name='enjoy[phone]']").val();
			var email = $("input[name='enjoy[email]']").val();
			if($("input[name='enjoy[username]']").val()==""){
				$("#username_error").html("请填写姓名").css('display','block');
				return false;
			} else {
				$("#username_error").css('display','none');
			}
			if(!(/^[\u4e00-\u9fa5]{2,4}$/i.test(username))){
				$("#username_error").html("请填写真实姓名").css('display','block');
				return false;
			} else {
				$("#username_error").css('display','none');
			}
			if($("input[name='enjoy[email]']").val()==""){
				$("#email_error").html("请填写邮箱").css('display','block');
				return false;
			} else {
				$("#email_error").css('display','none');
			}
			if(!(/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/.test(email))){
				$("#email_error").html("请填写正确的邮箱").css('display','block');
				return false;
			} else {
				$("#email_error").css('display','none');
			}
			if($("input[name='enjoy[phone]']").val()==""){
				$("#phone_error").html("请填写手机号").css('display','block');
				return false;
			} else {
				$("#phone_error").css('display','none');
			}
			if(!(/^1(3[0-9]|5[012356789]|8[0-9]|4[7]|7[678])\d{8}$/.test(tel))){
				$("#phone_error").html("请填写正确的手机号").css('display','block');
                return false;
			} else {
				$("#phone_error").css('display','none');
			}
			/* if($("input[name='valicode']").val()==""){
				alert('请填写验证码');
				return false;
			} */
		}
	</script>
	<script type="text/javascript">
	</script>
{template "content","footer"}